module Msf::DBManager::ExploitedHost
  def each_exploited_host(wspace=framework.db.workspace,&block)
  ::ActiveRecord::Base.connection_pool.with_connection {
    wspace.exploited_hosts.each do |eh|
      block.call(eh)
    end
  }
  end

  # This method returns a list of all exploited hosts in the database.
  def exploited_hosts(wspace=framework.db.workspace)
  ::ActiveRecord::Base.connection_pool.with_connection {
    wspace.exploited_hosts
  }
  end
end